<?php
declare (strict_types=1);

namespace app\api\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Attribute extends Model
{
    public $table = 'pyg_attribute';
    protected $pk = 'id';

    public static function delAttrs($id)
    {
        return self::where('type_id', $id)->delete();
    }

    public function addAttrs($data){
        return $this->saveAll($data);
    }
}
